package com.unionftech.common.common.contract

import com.unionftech.common.base.mvp.IBasePresenter
import com.unionftech.common.base.mvp.IBaseView
import com.unionftech.common.base.mvp.impl.IBaseCallBack
import com.unionftech.common.bean.ResponseResult
import com.unionftech.common.common.bean.AppVersionInfo
import com.unionftech.common.common.bean.BannerImageInfo
import com.unionftech.common.common.bean.BannerPosition
import com.unionftech.common.common.bean.CountryInfo
import com.unionftech.common.common.bean.UserKYCFileInfo
import com.unionftech.common.common.bean.PhoneRegexInfo
import com.unionftech.common.common.bean.TradePlatform
import com.unionftech.common.common.bean.SystemUserInfo
import com.unionftech.common.common.bean.UserGroupInfo
import com.unionftech.common.common.bean.request.SendCodeRequest
import com.unionftech.common.common.bean.request.SendEmailCodeRequest

interface CommonContract {
    interface ICommonPresenter : IBasePresenter {
        fun queryCountryByIp()
        fun getPublicKey()
        fun requestCountryList()
        fun getAllCountryPhoneRegex()
        fun execSendCode(requestBean: SendCodeRequest, token: String? = null)
        fun sendCodeRegister(requestBean: SendCodeRequest)
        fun getOuterUserInfo(token: String)
        fun getKycInfo(token: String)
        fun checkInvitationCode(token: String, code: String)
        fun execSendEmailCode(requestBean: SendEmailCodeRequest)
        fun querySystemDemoPlatform(token: String)
        fun queryPlatform(token: String, code: String)
        fun queryGroupAndCurrency(token: String, code: String)
        fun queryAccountType(token: String, code: String)
        fun queryCurrency(token: String, code: String, platform: String, tradeType: String)
        fun getBannerList(position: BannerPosition)
        fun getUpdateInfo()
    }

    interface ICountryView : IBaseView {
        fun handleCountryList(response: ResponseResult<List<CountryInfo>>)
    }

    interface IDefaultView : IBaseView {
        fun handleDefaultCountryInfo(response: ResponseResult<CountryInfo>)
        fun handlePublicKey(response: ResponseResult<String>)
    }

    interface IDefaultCountryView : IBaseView {
        fun handleDefaultCountryInfo(response: ResponseResult<CountryInfo>)
    }

    interface IPublicKeyView : IBaseView {
        fun handlePublicKey(response: ResponseResult<String>)
    }

    interface IPhoneRegexView : IBaseView {
        fun handleAllPhoneRegex(response: ResponseResult<List<PhoneRegexInfo>>)
    }

    interface ISendCodeView : IBaseView {
        fun handleSendCode(response: ResponseResult<Any?>)
    }

    interface IAccountView : IBaseView {
        fun handleOuterUserInfoResult(response: ResponseResult<SystemUserInfo>)
    }

    interface IKycInfoView : IBaseView {
        fun handleKycInfoResult(response: ResponseResult<UserKYCFileInfo>)
    }

    interface ICheckCodeView : IBaseView {
        fun handleCheckInvitationCode(response: ResponseResult<Any?>)
    }

    interface IPlatformView : IBaseView {
        fun handlePlatformView(response: ResponseResult<List<TradePlatform>>)
    }

    interface ICurrencyView : IBaseView {
        fun handleCurrencyView(response: ResponseResult<List<String>>)
        fun handleGroupCurrencyView(response: ResponseResult<UserGroupInfo>)
    }

    interface IAccountTypeView : IBaseView {
        fun handleAccountTypeView(response: ResponseResult<List<Int>>)
    }

    interface IBannerView : IBaseView {
        fun handleBannerView(
            position: BannerPosition,
            response: ResponseResult<List<BannerImageInfo>>
        )
    }

    interface IUpdateView : IBaseView {
        fun handleUpdateView(
            response: ResponseResult<AppVersionInfo>
        )
    }

    interface ICommonModel {
        fun getPublicKey(callBack: IBaseCallBack<ResponseResult<String>>)
        fun queryCountryByIp(callBack: IBaseCallBack<ResponseResult<CountryInfo>>)
        fun execCountryList(callBack: IBaseCallBack<ResponseResult<List<CountryInfo>>>)
        fun getAllCountryPhoneRegex(callBack: IBaseCallBack<ResponseResult<List<PhoneRegexInfo>>>)
        fun execSendCode(
            requestBean: SendCodeRequest,
            callBack: IBaseCallBack<ResponseResult<Any?>>?,
            token: String? = null
        )

        fun sendCodeRegister(
            requestBean: SendCodeRequest,
            callBack: IBaseCallBack<ResponseResult<Any?>>?,
        )

        fun execSendEmailCode(
            requestBean: SendEmailCodeRequest, callBack: IBaseCallBack<ResponseResult<Any?>>?
        )

        fun getOuterUserInfo(token: String, callBack: IBaseCallBack<ResponseResult<SystemUserInfo>>)
        fun getKycInfo(token: String, callBack: IBaseCallBack<ResponseResult<UserKYCFileInfo>>)
        fun checkInvitationCode(
            token: String,
            code: String,
            callBack: IBaseCallBack<ResponseResult<Any?>>
        )

        fun querySystemDemoPlatform(
            token: String,
            callBack: IBaseCallBack<ResponseResult<List<TradePlatform>>>
        )

        fun queryPlatform(
            token: String,
            code: String,
            callBack: IBaseCallBack<ResponseResult<List<TradePlatform>>>
        )

        fun queryGroupAndCurrency(
            token: String,
            code: String,
            callBack: IBaseCallBack<ResponseResult<UserGroupInfo>>
        )

        fun queryAccountType(
            token: String,
            code: String,
            callBack: IBaseCallBack<ResponseResult<List<Int>>>
        )

        fun queryCurrency(
            token: String,
            code: String,
            platform: String,
            tradeType: String,
            callBack: IBaseCallBack<ResponseResult<List<String>>>
        )

        fun getBannerList(
            position: BannerPosition,
            callBack: IBaseCallBack<ResponseResult<List<BannerImageInfo>>>
        )

        fun getUpdateInfo(
            callBack: IBaseCallBack<ResponseResult<AppVersionInfo>>
        )
    }
}